<?php
namespace app\manage\model;
use think\Model;
use think\Db;
class User extends Model
{
    public function editmyself($id,$name){
        $db = Db::name('user')
            ->update([
                'id' => $id,
               'name' => $name
            ]);
        return $db;
    }
    public function editroot($id,$newroot){
        $db = Db::name('user')->update([
           'id' => $id,
           'root' => $newroot
        ]);
        return $db;
    }
}